package com.ruoyi.domain.purchase;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 采购退货主表对象 mes_purchase_return
 *
 * @author ruoyi
 * @date 2024-01-01
 */
@Data
public class MesPurchaseReturn extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 退货单ID */
    private Long returnId;

    /** 退货单号 */
    @Excel(name = "退货单号")
    private String returnCode;

    /** 原入库单ID */
    @Excel(name = "原入库单ID")
    private Long originalReceiptId;

    /** 原入库单号 */
    @Excel(name = "原入库单号")
    private String originalReceiptCode;

    /** 供应商ID */
    @Excel(name = "供应商ID")
    private Long supplierId;

    /** 供应商编码 */
    @Excel(name = "供应商编码")
    private String supplierCode;

    /** 供应商名称 */
    @Excel(name = "供应商名称")
    private String supplierName;

    /** 仓库ID */
    @Excel(name = "仓库ID")
    private Long warehouseId;

    /** 仓库编码 */
    @Excel(name = "仓库编码")
    private String warehouseCode;

    /** 仓库名称 */
    @Excel(name = "仓库名称")
    private String warehouseName;

    /** 退货日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "退货日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date returnDate;

    /** 退货原因 */
    @Excel(name = "退货原因")
    private String returnReason;

    /** 退货总金额 */
    @Excel(name = "退货总金额")
    private BigDecimal totalAmount;

    /** 退货总数量 */
    @Excel(name = "退货总数量")
    private BigDecimal totalQuantity;

    /** 退货类型（QUALITY质量问题 EXCESS超量 DAMAGE损坏 OTHER其他） */
    @Excel(name = "退货类型", readConverterExp = "QUALITY=质量问题,EXCESS=超量,DAMAGE=损坏,OTHER=其他")
    private String returnType;

    /** 状态（PENDING待退货 COMPLETED已完成 CANCELLED已取消） */
    @Excel(name = "状态", readConverterExp = "PENDING=待退货,COMPLETED=已完成,CANCELLED=已取消")
    private String status;

    /** 操作人员ID */
    @Excel(name = "操作人员ID")
    private Long operatorId;

    /** 操作人员姓名 */
    @Excel(name = "操作人员姓名")
    private String operatorName;

    /** 审核人员ID */
    @Excel(name = "审核人员ID")
    private Long approveId;

    /** 审核人员姓名 */
    @Excel(name = "审核人员姓名")
    private String approveName;

    /** 审核时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date approveTime;

    /** 退货明细列表 */
    private List<MesPurchaseReturnItem> returnItemList;
}